/*
 * Project Name: showtao
 * File Name: CategoryServiceImpl.java
 * Class Name: CategoryServiceImpl
 *
 * Copyright 2014 showtao.com
 *
 * Licensed under the showtao.com
 *
 * http://showtao.com
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 * implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.showtao.front.ws;

import java.util.ArrayList;
import java.util.List;

import javax.jws.WebService;

import org.springframework.validation.BindingResult;

import com.showtao.common.validation.ValidateException;
import com.showtao.front.domain.Product;

/**
 * Class Name: CategoryServiceImpl Description: Sample implementation
 * 
 * @author chunlinwang
 * 
 */

@WebService(endpointInterface = "com.showtao.front.ws.ProductWebService")
public class ProductWebServiceImpl implements ProductWebService {

    public List<Product> getProducts(String categoryId) throws Exception {
        if ("REPTILES".equals(categoryId)) {
            throw new ValidateException(new ArrayList<BindingResult>());
        }
//        return catalogService.getProductListByCategory(categoryId);\
        // TODO
        return null;

    }

}
